libpng error handlers must not return to their callers, thus longjmp out.
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Mar 2002 21:40:01 +0000 (21:40 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Mar 2002 21:40:01 +0000 (21:40 +0000)
* io-png.c (png_simple_error_callback): libpng error handlers must
not return to their callers, thus longjmp out. This prevents
annoying stderr output from the default error handler.

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-png.c

index c8e6183bddcdc267b6189144ea23b8eda2123927..36ec6b35c7c6ae43f28542a58917a1c416ec2876 100644 (file)
@@ -1,3 +1,9 @@
+2002-03-29  Matthias Clasen  <maclas@gmx.de>
+
+       * io-png.c (png_simple_error_callback): libpng error handlers must
+       not return to their callers, thus longjmp out. This prevents
+       annoying stderr output from the default error handler.
+
 2002-03-27  Matthias Clasen  <maclas@gmx.de>
 
        * io-png.c (gdk_pixbuf__png_image_stop_load): Don't leak info_ptr.
index 66f99fdfe187b2892346c3ea1dd26f3a6d5fefbf..8111cacc0db735b25293cba8c484cbbd9eebee09 100644 (file)
@@ -183,6 +183,8 @@ png_simple_error_callback(png_structp png_save_ptr,
                              _("Fatal error in PNG image file: %s"),
                              error_msg);
         }
+
+        longjmp (png_save_ptr->jmpbuf, 1);
 }
 
 static void